/**
 * @overview http的工具类
 */

/**
 * 获取url中"?"符后的字串
 * @export
 * @param {*} url url链接字符串
 * @return {object} 以数据对象的形式返回
 * @memberof HttpUtil
 */
export function getUrlParams(url) {
  var params = {}
  if (url.indexOf('?') != -1) {
    var str = url.substr(1)
    str = str.split('&')
    for (var i = 0; i < str.length; i++) {
      params[str[i].split('=')[0]] = str[i].split('=')[1]
    }
  }
  return params
}
